package com.aldobucchi.x.flash.geom
{
	import flash.geom.Point;
	
	
	
	public class PolarPointTest extends AbstractGeomTest
	{
		
		public function testConstruction( ):void
		{

		
			// make sure that we are not rotated and things work
			// just like using Point.polar

			assertPointsSimilar( 
				new PolarPoint( 10, Math.PI ),
				Point.polar( 10, Math.PI )
				);
				


			assertPointsSimilar( 
				new PolarPoint( 10, Math.PI * 2 ),
				Point.polar( 10, Math.PI * 2 )
				);


			assertPointsSimilar( 
				new PolarPoint( 10, Math.PI * 3 ),
				Point.polar( 10, Math.PI * 3 )
				);
						

			assertPointsSimilar( 
				new PolarPoint( 10, Math.PI * 4 ),
				Point.polar( 10, Math.PI * 4 )
				);


			assertPointsSimilar( 
				new PolarPoint( 10, 0 ),
				Point.polar( 10, 0 )
				);


			assertPointsSimilar( 
				new PolarPoint( 0, 0 ),
				Point.polar( 0, 0 )
				);



			////////////////////////////
			// fromPoint factory


			assertPointsSimilar( 
				PolarPoint.fromPoint( new Point( 0, 0 ) ),
				new Point( 0, 0 )
				);

			assertPointsSimilar( 
				PolarPoint.fromPoint( new Point( 10, -10 ) ),
				new Point( 10, -10 )
				);





		
		}

		
	}

}